package java2;

import java.util.*;

public class Q4 {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		while (in.hasNext()) {
			int n = in.nextInt();
			int s=0, j;
			String K;
			String[][] str = new String[n][];
			for (int i = 0; i < n; i++) {
				str[i] = new String[i+1];
				for (j = 0; j < i+1; j++) {
					s = (i+1) * (j+1);
					K = String.format("%d*%d=%d",i+1, j+1, s);
					if(j==i)
						System.out.printf("%s", K);
					else
						System.out.printf("%-7s", K);
					str[i][j]=new String(K);
				}
			System.out.println("");
			}
		System.out.println(Arrays.deepToString(str));
		}
	}
}
